<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../org/angular.min.js"></script>
</head>
<body ng-app="hd">
    <div ng-controller='ctrl'></div>
         <ul>
             <li ng-repeat='(k,v) in data track by $index' style="{{$odd?'color:red' : '' }}">
                 名称：{{v.name}}  网址： {{v.url}}
            </li>
            <hr>
             <li>
                 <span ng-if='$first' style="{{ $first?'color:red': '' }}">{{ v.name }}</span>
                 <span ng-if='$middle'>{{v.name}}</span>
                 <span ng-if="$last" style="{{ $last?'color:green':'' }}">{{ v.name }}{{v.url}}</span>
             </li>
         </ul>

    <script>
      var vm = angular.module('hd',[]);
      vm.controller('ctrl',['$scope',function($scope){
              $scope.a = 99;
              $scope.data = [
                  {name: '后盾人',url: 'houdunren.com'},
                  {name: '后盾人',url: 'houdunren.com'},
                  {name: '后盾人',url: 'houdunren.com'},
                  {name: '后盾人',url: 'houdunren.com'},
              ]
      }])
    </script>
</body>
</html>